package lesson2;

import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * User: Nasty
 * Date: 09.03.14
 * Time: 17:51
 * To change this template use File | Settings | File Templates.
 */
public class homeWork {

    @DataProvider (name = "data_provider")
    public Object[][]  provideData()
    {
        int[] list = {1, 2, 3};
        return new Object[][]{{list}};
    }

    @Test(dataProvider = "data_provider")
    public void homeWork (int[] array)
    {

        int[] sortarray = new int[array.length];
        System.arraycopy(array,0,sortarray,0,array.length);

        Arrays.sort(sortarray);

        Assert.assertEquals(sortarray, array);

    }
}